import axios from "@/utils/http";
//数据
const state = {
  //数据定义处
  tableData:[],
  tableTotal: 1,
};

const getters = {
  getLogData(state:any){
    return state.tableData
  },
};

const mutations = {
  //修改数据处 ，可在这写axios请求拿数据
  setLogData(state:any,page:any){
    axios({
      url:"/setting/log/showLogs",
      method:"get",
      params:{
        currentPage: page.currentPage,
        pageSize: page.pageSize,
        keywords:page.keywords
      }
      }).then((res:any)=>{
          console.log("日志数据",res.data.data);
          state.tableData=res.data.data
          state.tableTotal = res.data.count;
     }).catch(err=>{
      console.log(err);
     })
    
  },


  // 搜索数据接口
//   searchRegData1(state:any){
//     axios({
//       url:"/seeDoctor/register/queryRegister",
//       method:"get",
//       params:{
//         bankName:"网特",
//         stateType:"2",
//         startTime:"2023-02-23 15:52:42",
//         endTime:"2023-02-24 10:29:26",
//         CurrentPage:1,
//         PageSize:5
//       }
//       }).then((res:any)=>{
//           console.log("搜索数据",res.data);
          
//      }).catch(err=>{
//       console.log(err);
//      })
//   }
};

const actions = {};

export default {
  state,
  mutations,
  actions,
  getters,
};
